]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Try harder to find a transition
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 20 Sep 2019 00:50:36 +0000 (02:50 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 20 Sep 2019 16:40:46 +0000 (16:40 +0000)
When easing, we need the transition of one of the involved properties
to connect our callbacks. Currently we simply get the transition for
the first property, however as Clutter optimizes the case where a
property doesn't actually change, that transition may be NULL even
though we still animate other properties.

So instead of only looking at the transition of the first property,
try to find a transition for any of the involved properties.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1572

js/ui/environment.js

index 1f9420035da4e9a64910436e133cc3055939063c..38d1d281a61ab6e3ff10103d29bac655e6b29e56 100644 (file)
@@ -121,7 +121,9 @@ function _easeActor(actor, params) {
     actor.set(params);
     actor.restore_easing_state();
 
-    let transition = actor.get_transition(animatedProps[0]);
+    let transition = animatedProps.map(p => actor.get_transition(p))
+        .find(t => t !== null);
+
     if (transition)
         transition.connect('stopped', (t, finished) => callback(finished));
     else